import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import * as Icons from "@element-plus/icons";
import "element-plus/dist/index.css";
import "./api/mock";
import svgIcon from "./icons/svg-icon.vue";
import "./router/premit";
import global from "./utils/global";

const app = createApp(App);
app.use(store).use(router).use(global).mount("#app");

app.use(ElementPlus, {
    locale: zhCn,
})

app.config.productionTip = false;


// 引入自定义的图标组件
app.component("svg-icon", svgIcon);

// 全局引入icon
for (let iconName in Icons) {
    app.component(iconName, Icons[iconName])
}